#ifndef TOTAL_H
#define TOTAL_H

#include <QWidget>
#include<QString>

#define WIDTH 1200
#define HEIGHT 800
#define LENGTH 400



typedef struct Bus{
    int position;
    int direction;
    int status;
}bus;

typedef struct node
{
    int servise_position; //请求发生的站点号
    int servise_direction; // 0代表车内服务，1代表搭乘顺时针车的请求，2代表搭乘逆时针车的请求
    int start_time;        //记录得到需求的时间
} node;

extern bus Bus;
extern int TOTAL_STATION;
extern int DISTANCE;
extern int distance;
extern QVector<QString>head;
extern QVector<QVector<int>> array; //输出的数组
extern QVector<QVector<int>> waittime; //等待时间
extern int curtime; //计时器
extern QString s;
extern QQueue<node> Q;
extern int x_1;
extern int y_1;
extern int x_2;
extern int y_2;
extern int bus_x ;
extern int bus_y ;


namespace Ui {
class total;
}

class total : public QWidget
{
    Q_OBJECT

public:
    explicit total(QWidget *parent = 0);
    ~total();

public slots:
void on_SSTF_clicked();
void on_FCFS_clicked();
void on_SCAN_clicked();


private:
    Ui::total *ui;


};

#endif // TOTAL_H
